package cn.gok.thread;

/**
 * @ClassName Person
 * @Description TODO
 * @Author HP
 * @Date 17:22 2022/7/12
 * @Version 1.0
 **/
public class Person {
    private String name;
    private String sex;

    public Person(String name, String sex) {
        this.name = name;
        this.sex = sex;
    }
    public synchronized void show(){
        System.out.println(this.name+this.sex);
    }
    public synchronized void modify(String name,String sex){
        this.name=name;
        this.sex=sex;

    }

}
